<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>EnvDiv</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
</head>
<body>

<h1>EnvDiv</h1>

<p>Sets a <a href="../Variables.htm">variable</a> to itself divided by the given value. Synonymous with: <code>Var /= Value</code>.</p>

<pre class="Syntax">EnvDiv, Var, Value</pre>
<h3>Parameters</h3>
<dl>

  <dt>Var</dt>
  <dd><p>The name of the <a href="../Variables.htm">variable</a> upon which to operate.</p></dd>

  <dt>Value</dt>
  <dd><p>Any integer, floating point number, or <a href="../Variables.htm#Expressions">expression</a>.</p></dd>

</dl>

<h3>Remarks</h3>
<p>This command is equivalent to the shorthand style: <code>Var /= Value</code>.</p>
<p>Division by zero will result in an error-message window  when the script is loaded (if possible); otherwise it makes the variable blank.</p>
<p>If either <em>Var</em> or <em>Value</em> is blank or does not start with a number, it is considered to be 0 for the purpose of the calculation (except when used <em>internally</em> in an expression such as <code>Var := X /= Y</code>).</p>
<p>If either <em>Var</em> or <em>Value</em> contains a decimal point, the end result will be a floating point number in the format set by <a href="SetFormat.htm">SetFormat</a>. Otherwise, the result will be truncated (e.g. 19 divided by 10 will yield 1).</p>
<h3>Related</h3>
<p><a href="EnvAdd.htm">EnvAdd</a><a href="EnvSub.htm">, EnvSub</a>, <a href="EnvMult.htm">EnvMult</a>, <a href="SetFormat.htm">SetFormat</a>, <a href="../Variables.htm#Expressions">Expressions</a>, <a href="IfIs.htm">If var is [not] type</a>, <a href="SetEnv.htm">SetEnv</a>, <a href="Transform.htm">bitwise operations (Transform)</a></p>
<h3>Example</h3>
<pre class="NoIndent">EnvDiv, MyCount, 2
MyCount /= 2  <em>; Equivalent to above</em></pre>

</body>
</html>
